package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

@Entity
@Table(name = "", schema = "oa", catalog = "")
public class ContractTermsEntity extends BaseEntity {

    private String mainId = "";
    private String contractTerms = "";
    private Integer sortNo = 0;
    private Integer logFlag = 0;
    private String termsNo = "";

    public String getTermsNo() {
        return termsNo;
    }

    public void setTermsNo(String termsNo) {
        this.termsNo = termsNo;
    }

    public Integer getLogFlag() {
        return logFlag;
    }

    public void setLogFlag(Integer logFlag) {
        this.logFlag = logFlag;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getContractTerms() {
        return contractTerms;
    }

    public void setContractTerms(String contractTerms) {
        this.contractTerms = contractTerms;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("CONTRACT_TERMS", getContractTerms());
        obj.put("SORT_NO", getSortNo());
        obj.put("TERMS_NO", getTermsNo());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_con_terms";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("CONTRACT_TERMS", "contractTerms");
        obj.put("SORT_NO", "sortNo");
        obj.put("TERMS_NO", "termsNo");
        return obj;
    }

}
